Change case statment to if/end
Change from render new to redirect to sign_in_path
Change from render new to redirect to sign_in_path