worked on login function, currently not finished