basic login functionality and tests