Refactored login
Re-added category add code