Associated related models in controller & implemented logout function