Updated templates actions and views
Updated register handlers
Refactored login method
Added refer entity and api methods