inherited the api reg && sessions from devise controller and implemented api according to that