session[:user_id] was not getting set correctly when registering