more work on ajax link
fix log out for ajax link