Fresh commit after a while. Working towards fixing the authentication