Fix login and register url

Add API constant