added ajax call to check the current user