Completed the login system