def create
      if (@user = Incline::UserManager.authenticate(params[:session][:email], params[:session][:password], request.remote_ip))
        if @user.activated?
          # log the user in.
          log_in @user
          params[:session][:remember_me] == '1' ? remember(@user) : forget(@user)

          # show alerts on login.
          session[:show_alerts] = true

          redirect_back_or @user
        else
          flash[:safe_warning] = 'Your account has not yet been activated.<br/>Check your email for the activation link.'
          redirect_to main_app.root_url
        end
      else
        # deny login.
        flash.now[:danger] = 'Invalid email or password.'
        render 'new'
      end
    end
def create
      if (@user = Incline::UserManager.authenticate(params[:session][:email], params[:session][:password], request.remote_ip))
        if @user.activated?
          # log the user in.
          log_in @user
          params[:session][:remember_me] == '1' ? remember(@user) : forget(@user)

          # show alerts on login.
          session[:show_alerts] = true

          redirect_back_or @user
        else
          flash[:safe_warning] = 'Your account has not yet been activated.<br/>Check your email for the activation link.'
          redirect_to main_app.root_url
        end
      else
        # deny login.
        flash.now[:danger] = 'Invalid email or password.'
        render 'new'
      end
    end
POST /incline/login