- refactored login helper to database helper