Got login functionality working