Refactored login to use express cookies