login functionality ror