ADD: separated code handling different request methods
ADD: basic login functionality