login fix

After login, the page will refresh
do not need this inner `if`
``` if a
  do some stuff
else /*same as !a */
  do other stuff
end ```