Added user authorization functionality