Try to build login function