backup your data, and do a factory reset to your phone, (make sure you know your current gmail account and password) otherwise you won't be able to use your phone again .
if the problem still the same, your router maybe DNS hijacked, reset it to factory and set a new password other than the default one.