Working user login and got rid of some warnings