some refactoring to make login via e-mail OR name possible