most importantly: go back to previous page after login