rewrite login api
rewrit register api