Refactored success message by using redirect and session