diff --git a/frontend/src/api_client.js b/frontend/src/api_client.js
index 76e914a..47262ec 100644
--- a/frontend/src/api_client.js
+++ b/frontend/src/api_client.js
@@ -145,4 +145,40 @@ export default
});
return response.data;
}
-}
\ No newline at end of file
+
+ /**
+ * Register a new user
+ * @param {String} username The username of the new user
+ * @param {String} password The password of the new user
+ * @returns {Object} The response data from the API
+ */
+ static async registerUser(username, password) {
+ try {
+ const response = await axios.post('/api/user/signup/', {
+ username,
+ password
+ });
+ return response.data;
+ } catch (error) {
+ throw new Error('Error registering user: ' + error.message);
+ }
+ }
+
+ /**
+ * Log in an existing user
+ * @param {String} username The username of the user
+ * @param {String} password The password of the user
+ * @returns {Object} The response data from the API
+ */
+ static async loginUser(username, password) {
+ try {
+ const response = await axios.post('/api/user/login/', {
+ username,
+ password
+ });
+ return response.data;
+ } catch (error) {
+ throw new Error('Error logging in: ' + error.message);
+ }
+ }
+}
diff --git a/frontend/src/components/Header.vue b/frontend/src/components/Header.vue
index b8a4850..03628e0 100644
--- a/frontend/src/components/Header.vue
+++ b/frontend/src/components/Header.vue
@@ -10,6 +10,8 @@ import { RouterLink } from 'vue-router'
This is login page
-
-
{{ validationMessage }}
+ +{{ validationMessage }}
+ +