automatically login after registration, added test coverage