Adds login and registration ajax call.

Adds login and registration ajax calls. Please check