Tried implementing ajax call for sign in process. Partially successful (requires page refresh to work