Fixed refresh problem with login