A login function with login wrapper for laravel