Prepare login
Temporary use cookie to redirect file after login