Added support for logging in