Adding user authentication with devise, still buggy and requires refactoring