add Gemfile and fix base login method