Loginlogic

Built and added all index.rb, and login model logic.