Working on the login method, still needs some fine tuning