implemented the first parts of the login system