Clean up login functions