created login functionality for angularjs / laravel