Added oauth login flow
Added api controller and some api methods