Moddified login and singup controller