modified files to return a correct page after login