Fix params headers bugs
Support user logging in api