Check if your controller classes and your application_controller.rb for any before_filters. Sometime authentication gems come with this type of functionality. Are you using any?
James is right, I guess your categories page requires user’s to be logged in (ie, you have some before_filter in your controller), and in the login action you are not properly setting appropriate login parameters (which means user is not getting signed in through login action) You will have to check your login action.