fixed login after register bug